from django.urls import path
from xadmin.views import node, site, template, upload, articlegroup, article, login, userprofile, auditlog,part,partelement, staticfileprocess

urlpatterns = [
    path('', node.node_list, name='node'),
    path('site/list/', site.site_list, name='sitelist'),
    path('site/add/', site.site_add, name='siteadd'),
    path('site/edit/<int:siteid>/', site.site_edit, name='siteedit'),
    path('site/del/<int:siteid>/', site.site_del, name='sitedel'),
    path('node/list/', node.node_list, name='nodelist'),
    path('node/add/', node.node_add, name='nodeadd'),
    path('node/edit/<int:nodeid>/', node.node_edit, name='nodeedit'),
    path('node/del/', node.node_del, name='nodedel'),
    path('node/moveup/', node.node_move, name='nodemove'),
    path('template/add/', template.template_add, name='templateadd'),
    path('template/list/', template.template_list, name='templatelist'),
    path('template/edit/<int:templateid>/', template.template_edit, name='templateedit'),
    path('template/del/', template.template_del, name='templatedel'),
    path('templates/del/', template.templates_del, name='templatesdel'),
    path('nodegroup/list/', node.nodegroup_list, name='nodegrouplist'),
    path('nodegroup/add/', node.nodegroup_add, name='nodegroupadd'),
    path('nodegroup/edit/<int:nodegroupid>/', node.nodegroup_edit, name='nodegroupedit'),
    path('nodegroup/del/', node.nodegroup_del, name='nodegroupdel'),
    path('nodegroups/del/', node.nodegroups_del, name='nodegroupsdel'),
    path('articlegroup/list/', articlegroup.articlegroup_list, name='articlegrouplist'),
    path('articlegroup/add/', articlegroup.articlegroup_add, name='articlegroupadd'),
    path('articlegroup/edit/<int:articlegroupid>', articlegroup.articlegroup_edit, name='articlegroupedit'),
    path('articlegroup/del/', articlegroup.articlegroup_del, name='articlegroupdel'),
    path('atriclegroups/del/', articlegroup.articlegroups_del, name='atriclegroupsdel'),
    path('article/list/', article.article_list, name='articlelist'),
    path('article/add/', article.article_add, name='articleadd'),
    path('article/state/', article.article_change_state, name='articlestate'),
    path('article/del/', article.article_del, name='articledel'),
    path('article/edit/<int:articleid>/', article.article_edit, name='articleedit'),
    path('articles/del/', article.articles_del, name='articlesdel'),
    path('articles/move/', article.articles_move, name='articlesmove'),
    path('articles/copy/', article.articles_copy, name='articlescopy'),
    path('article/addGroup/', articlegroup.selectArticleGroup, name='articleaddgroup'),
    path('article/addGroups/', article.article_add_group, name='articleaddgroups'),
    path('article/filterGroup/', article.article_filter_group, name='articlefiltergroup'),
    path('article/removeGroup/', article.article_remove_group, name='articleremovegroup'),
    path('article/restore/', article.article_restore, name='articlerestore'),
    path('article/clear/', article.article_clear, name='articleclear'),
    path('article/clear/all/', article.article_clear_all, name='articleclearall'),
    path('get_valid_img.png/', login.validcode, name="vcode"),
    path('login/', login.dologin, name='dologin'),
    path('logout/', login.dologout, name='dologout'),
    path('user/password/set/<int:userid>', userprofile.modifyPassword, name='setpassword'),
    path('user/list/', userprofile.user_list, name='userlist'),
    path('user/add/', userprofile.user_add, name='useradd'),
    path('user/edit/', userprofile.user_edit, name='useredit'),
    path('user/del/', userprofile.user_del, name='userdel'),
    path('user/group/', userprofile.group_list, name='grouplist'),
    path('user/group/add/', userprofile.group_add, name='groupadd'),
    path('user/group/edit/', userprofile.group_edit, name='groupedit'),
    path('user/group/del/', userprofile.group_del, name='groupdel'),
    path('audit/list/', auditlog.index, name='auditlist'),
    path('part/list/', part.index, name='partlist'),
    path('part/add/', part.add, name='partadd'),
    path('part/edit/', part.edit, name='partedit'),
    path('part/del/', part.part_del, name='partdel'),
    path('element/list/', partelement.index, name='elelist'),
    path('element/add/', partelement.add, name='eleadd'),
    path('element/edit/', partelement.edit, name='eleedit'),
    path('element/del/', partelement.ele_del, name='eledel'),
    path('template/code/edit/<int:templateid>', template.edit_code, name='editcode'),
    path('stapro/', staticfileprocess.index, name='staticindex'),
    path('stapro/dir/', staticfileprocess.opendir, name='opendir'),
    path('stapro/file/', staticfileprocess.openfile, name='openfile'),

    path('upload_file.html', upload.upload_file),
    #path('manager_file.html', upload.manager_file),
    #path('test/', node.test),
]